<template>
    <div class="tool-btn-container">
        <el-icon class="tool-check" color="#42B883" size="12" v-if="check"><Select /></el-icon>
        <div class="tool-name">{{ name }}</div>
        <div class="tool-cut">{{ cut }}</div>
    </div>
</template>

<script>
import {Select} from "@element-plus/icons-vue";

export default {
    name: 'ToolBtn',
    components: {Select},
    props: {
        check: {
            type: Boolean,
            default: false
        },
        name: String,
        cut: String
    }
}
</script>

<style scoped lang="less">
.tool-btn-container {
    font-size: 14px;
    color: #333;
    padding: 4px 20px;
    box-sizing: border-box;
    background-color: #fff;
    transition: all 0.2s;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;

    &:hover {
        background-color: rgba(136, 136, 136, 0.15);
    }

    .tool-check {
        position: absolute;
        top: 50%;
        left: 4px;
        transform: translateY(-50%);
    }

    .tool-cut {
        color: #888;
        font-size: 12px;
    }
}
</style>